home *** CD-ROM | disk | FTP | other *** search
/ CD School House 9 / CD School House 9.0 - Wayzata Technology (1994).iso / pc / games / mac / __the_arcade__ / sea_hunt / card_6150.txt < prev    next >
Text File  |  1990-09-08  |  9KB  |  389 lines

  1. -- card: 6150 from stack: in
  2. -- bmap block id: 6479
  3. -- flags: 0000
  4. -- background id: 5171
  5. -- name: Start
  6. ----- HyperTalk script -----
  7. --
  8. --
  9. --   This stack and it's scripts and graphics are copyright 1989,
  10. --   Prophecy Software Inc.  All rights reserved.
  11. --
  12. --   You may examine this code for your own benifit.
  13. --   If you wish to make changes that enhance the stack please make
  14. --   them to a copy and contact us at:
  15. --
  16. --   Prophecy Software Inc.
  17. --   3650 Silverside Rd. Suite 3
  18. --   Wilmington, DE 19810
  19. --   (302) 994-1502
  20. --
  21. --   We will be happy to consider distributing an updated version with
  22. --   propper credit given to the author.  distribution of copies of this
  23. --   stack with un-authorized alterations constitures copyright
  24. --   violation and fraud.
  25.  
  26. on player
  27.   global my_choice, last_message, hit_count
  28.   global bs, su, tt, pt, ca, opponent
  29.  
  30.   put false into ship_ok
  31.  
  32.   set hilite of button bas of card "enemy board" to false
  33.   set hilite of button car of card "enemy board" to false
  34.   set hilite of button ttr of card "enemy board" to false
  35.   set hilite of button sub of card "enemy board" to false
  36.   set hilite of button ptb of card "enemy board" to false
  37.  
  38.   put 0 into bs
  39.   put 0 into su
  40.   put 0 into ca
  41.   put 0 into tt
  42.   put 0 into pt
  43.   put empty into opponent
  44.  
  45.   put random(10) into my_choice
  46.   put "st" && my_choice into last_message
  47.   get send_message("st" && my_choice && "ΓÇó")
  48.   go to card "enemy board"
  49.  
  50.   hide button 65
  51.   put "Clearing Field..." into card field 1
  52.   put 0 into hit_count
  53.  
  54.   repeat with count = 1 to 64
  55.     set icon of button count to 0
  56.     set icon of button count of card "Player Card" to 0
  57.     get field count of card "player board"
  58.     put it into card field count of card "Player Card"
  59.   end repeat
  60.   put "Starting Game..." into card field 1
  61. end player
  62.  
  63. on Computer
  64.   global opponent
  65.   global my_choice, last_message, hit_count
  66.   global bs, su, tt, pt, ca
  67.   global cbs, cca, ctt, csu, cpt, chit_count, results
  68.   global results, ship_up, where_at_now, direction, pattern, game_active
  69.  
  70.   set hilite of button bas of card "enemy board" to false
  71.   set hilite of button car of card "enemy board" to false
  72.   set hilite of button ttr of card "enemy board" to false
  73.   set hilite of button sub of card "enemy board" to false
  74.   set hilite of button ptb of card "enemy board" to false
  75.  
  76.   put 0 into bs
  77.   put 0 into su
  78.   put 0 into ca
  79.   put 0 into tt
  80.   put 0 into pt
  81.  
  82.   -- initialize computer information
  83.  
  84.   put 0 into cbs
  85.   put 0 into csu
  86.   put 0 into cca
  87.   put 0 into ctt
  88.   put 0 into cpt
  89.   put 0 into chit_count
  90.   put true into game_active
  91.   put empty into results
  92.  
  93.   put false into ship_up
  94.   put 1 into direction
  95.   put random(64) into pattern
  96.  
  97.   go to card "computer card"
  98.   put "" into card field "active"
  99.   send setup to card
  100.  
  101.   go to card "enemy board"
  102.   hide button 65
  103.   put "Clearing Field..." into card field 1
  104.   put 0 into hit_count
  105.  
  106.   repeat with count = 1 to 64
  107.     set icon of button count to 0
  108.     set icon of button count of card "Player Card" to 0
  109.     get field count of card "Computer Card"
  110.     put it into card field count of card "Player Card"
  111.   end repeat
  112.  
  113.   put "CVSC" into opponent
  114.   put "Starting Game..." into card field 1
  115.  
  116.   put random(10) into my_choice
  117.   put "st" && my_choice into last_message
  118.   get send_message("st" && my_choice && "ΓÇó")
  119. end computer
  120.  
  121. on mac
  122.   global opponent
  123.   global my_choice, last_message, hit_count
  124.   global bs, su, tt, pt, ca
  125.   global cbs, cca, ctt, csu, cpt, chit_count, results
  126.   global results, ship_up, where_at_now, direction, pattern, game_active
  127.   global whom
  128.  
  129.   go to card "enemy board"
  130.   hide button 65
  131.   put "Clearing Field..." into card field 1
  132.   put 0 into hit_count
  133.  
  134.   repeat with count = 1 to 64
  135.     set icon of button count to 0
  136.     set icon of button count of card "Player Card" to 0
  137.     get field count of card "player board"
  138.     put it into card field count of card "player card"
  139.   end repeat
  140.  
  141.   put "Starting Game..." into card field 1
  142.  
  143.   put random(10) into my_choice
  144.   put "st" && my_choice into last_message
  145.   get send_message("st" && my_choice && "ΓÇó")
  146. end mac
  147.  
  148.  
  149.  
  150.  
  151. -- part 1 (button)
  152. -- low flags: 00
  153. -- high flags: A003
  154. -- rect: left=118 top=73 right=94 bottom=243
  155. -- title width / last selected line: 0
  156. -- icon id / first selected line: 0 / 0
  157. -- text alignment: 1
  158. -- font id: 0
  159. -- text size: 12
  160. -- style flags: 0
  161. -- line height: 16
  162. -- part name: Play Hit Sounds
  163. ----- HyperTalk script -----
  164. on mouseUp
  165.   play shoot
  166.   wait 1 second
  167.   play boom
  168. end mouseUp
  169.  
  170.  
  171.  
  172. -- part 2 (button)
  173. -- low flags: 00
  174. -- high flags: A003
  175. -- rect: left=262 top=73 right=94 bottom=387
  176. -- title width / last selected line: 0
  177. -- icon id / first selected line: 0 / 0
  178. -- text alignment: 1
  179. -- font id: 0
  180. -- text size: 12
  181. -- style flags: 0
  182. -- line height: 16
  183. -- part name: Play Miss Sounds
  184. ----- HyperTalk script -----
  185. on mouseUp
  186.   play shoot
  187.   wait 1 second
  188.   play splash
  189. end mouseUp
  190.  
  191.  
  192.  
  193. -- part 9 (button)
  194. -- low flags: 00
  195. -- high flags: 2000
  196. -- rect: left=97 top=222 right=278 bottom=238
  197. -- title width / last selected line: 0
  198. -- icon id / first selected line: 0 / 0
  199. -- text alignment: 1
  200. -- font id: 0
  201. -- text size: 12
  202. -- style flags: 0
  203. -- line height: 16
  204. -- part name: Position Ships
  205. ----- HyperTalk script -----
  206. on mouseup
  207.   global whom
  208.   put empty into whom
  209.   visual effect scroll left
  210.   go to card "player board"
  211. end mouseup
  212.  
  213.  
  214.  
  215. -- part 13 (button)
  216. -- low flags: 00
  217. -- high flags: 2000
  218. -- rect: left=97 top=136 right=193 bottom=238
  219. -- title width / last selected line: 0
  220. -- icon id / first selected line: 0 / 0
  221. -- text alignment: 1
  222. -- font id: 0
  223. -- text size: 12
  224. -- style flags: 0
  225. -- line height: 16
  226. -- part name: Start Game
  227. ----- HyperTalk script -----
  228. on mouseUp
  229.   global whom
  230.  
  231.   visual effect barn door open
  232.   put "player" into whom
  233.  
  234.   go to card "configure"
  235. end mouseUp
  236.  
  237.  
  238.  
  239. -- part 14 (button)
  240. -- low flags: 00
  241. -- high flags: 2000
  242. -- rect: left=269 top=136 right=193 bottom=411
  243. -- title width / last selected line: 0
  244. -- icon id / first selected line: 0 / 0
  245. -- text alignment: 1
  246. -- font id: 0
  247. -- text size: 12
  248. -- style flags: 0
  249. -- line height: 16
  250. -- part name: Play Computer
  251. ----- HyperTalk script -----
  252. --
  253. --
  254. --   This stack and it's scripts and graphics are copyright 1989,
  255. --   Prophecy Software Inc.  All rights reserved.
  256. --
  257. --   You may examine this code for your own benifit.
  258. --   If you wish to make changes that enhance the stack please make
  259. --   them to a copy and contact us at:
  260. --
  261. --   Prophecy Software Inc.
  262. --   3650 Silverside Rd. Suite 3
  263. --   Wilmington, DE 19810
  264. --   (302) 994-1502
  265. --
  266. --   We will be happy to consider distributing an updated version with
  267. --   propper credit given to the author.  distribution of copies of this
  268. --   stack with un-authorized alterations constitures copyright
  269. --   violation and fraud.
  270.  
  271. on mouseUp
  272.   global opponent
  273.   global my_choice, last_message, hit_count
  274.   global bs, su, tt, pt, ca
  275.   global cbs, cca, ctt, csu, cpt, chit_count, results
  276.   global results, ship_up, where_at_now, direction, pattern, game_active
  277.   global whom
  278.  
  279.   set hilite of button bas of card "enemy board" to false
  280.   set hilite of button car of card "enemy board" to false
  281.   set hilite of button ttr of card "enemy board" to false
  282.   set hilite of button sub of card "enemy board" to false
  283.   set hilite of button ptb of card "enemy board" to false
  284.  
  285.   put 0 into bs
  286.   put 0 into su
  287.   put 0 into ca
  288.   put 0 into tt
  289.   put 0 into pt
  290.  
  291.   -- initialize computer information
  292.  
  293.   put 0 into cbs
  294.   put 0 into csu
  295.   put 0 into cca
  296.   put 0 into ctt
  297.   put 0 into cpt
  298.   put 0 into chit_count
  299.   put true into game_active
  300.   put empty into results
  301.  
  302.   put false into ship_up
  303.   put 1 into direction
  304.   put random(64) into pattern
  305.   put "Computer" into opponent
  306.   put "mac" into whom
  307.  
  308.   go to card "computer card"
  309.   put "" into card field "active"
  310.   send setup to card
  311.  
  312.   answer "Do you wish to move your ships now?" with "Yes" or "No"
  313.  
  314.   if it is "yes" then
  315.     go to card "player board"
  316.     exit mouseup
  317.   end if
  318.  
  319.  
  320.   send "Mac" to card start
  321.  
  322. end mouseUp
  323.  
  324.  
  325.  
  326. -- part 15 (button)
  327. -- low flags: 00
  328. -- high flags: 2000
  329. -- rect: left=269 top=222 right=279 bottom=410
  330. -- title width / last selected line: 0
  331. -- icon id / first selected line: 0 / 0
  332. -- text alignment: 1
  333. -- font id: 0
  334. -- text size: 12
  335. -- style flags: 0
  336. -- line height: 16
  337. -- part name: 
  338. ----- HyperTalk script -----
  339. on mouseUp
  340.   global whom
  341.  
  342.   visual effect barn door open
  343.   put "Computer" into whom
  344.  
  345.   go to card "configure"
  346. end mouseUp
  347.  
  348.  
  349.  
  350. -- part 16 (button)
  351. -- low flags: 00
  352. -- high flags: 2000
  353. -- rect: left=232 top=29 right=62 bottom=274
  354. -- title width / last selected line: 0
  355. -- icon id / first selected line: 2507 / 2507
  356. -- text alignment: 1
  357. -- font id: 0
  358. -- text size: 12
  359. -- style flags: 0
  360. -- line height: 16
  361. -- part name: 
  362. ----- HyperTalk script -----
  363. on mouseUp
  364.   visual effect barn door open
  365.   go to next card
  366. end mouseUp
  367.  
  368.  
  369.  
  370. -- part 17 (button)
  371. -- low flags: 00
  372. -- high flags: A003
  373. -- rect: left=216 top=302 right=323 bottom=289
  374. -- title width / last selected line: 0
  375. -- icon id / first selected line: 0 / 0
  376. -- text alignment: 1
  377. -- font id: 0
  378. -- text size: 12
  379. -- style flags: 0
  380. -- line height: 16
  381. -- part name: Intro
  382. ----- HyperTalk script -----
  383. on mouseUp
  384.   visual effect barn door open
  385.   go to card 2
  386.  
  387. end mouseUp
  388.  
  389.